﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DeltaPlcSystem
{
    public partial class RightForm : Form
    {
        EnableForm ef;
        int mode = 0;
        public RightForm()
        {
            InitializeComponent();
            MaximizeBox = false;
        }

        public RightForm(int model) : this()
        {
           
            mode = model;
        }
        public RightForm(EnableForm efTemp,int model):this()
        {
            ef = efTemp;
            mode = model;
        }

        private void uiButton1_Click(object sender, EventArgs e)
        {
            if (uiTextBox1.Text == Form1.Password)
            {



                if (mode == 0)
                {
                    this.Close();
                    ef.ShowDialog();
                }
                else
                {
                    Environment.Exit(0);
                }
                                    
            }
            else { MessageBox.Show("验证失败"); }
        }


      
    }
}
